package com.grocery.dao;

import com.grocery.bean.Order;
import com.grocery.bean.Orderaddress;
import com.grocery.bean.Orderdetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderDao {
    int addOrder(@Param("order") Order order);
    int addOrderDetail(@Param("orderdetail") List<Orderdetail> orderdetail);
    int addOrderAddress(@Param("orderaddress") Orderaddress orderaddress);
    Order getOrderByID(@Param("id") Integer id);
    int paymentSuccess(@Param("code") String code);
    int cancelorder();
    List<Order> getAllOrder();
    int getCount(@Param("text") String text);
    int editState(@Param("code") Integer code, @Param("state") Integer state);
    List<Order> getOrderByuserID(@Param("userid") Integer userid);
}
